import { ref } from 'vue'
import { defineStore } from 'pinia'

import {
  gaode_image,
  gaode_scl2,
  gaode_vector,
  docLayer,
  heatMapLayer,
  DrawLayer,
  BoxDrawLayer,
  MeasuringLayer,
  flowLayer,
  EventLayer,
  HighlightLayer
} from '@/plugins/Layers'

export const useCounterStore = defineStore('counter', () => {
  const layersArr = ref([
    gaode_vector,
    gaode_scl2,
    gaode_image,
    docLayer,
    heatMapLayer,
    DrawLayer,
    BoxDrawLayer,
    MeasuringLayer,
    flowLayer,
    EventLayer,
    HighlightLayer
  ])
  // 生成server
  const setService = (layerId)=>{
    const service = {
      name: 'guanggu3',
      layerId,
  }
  return service
  }

  return { layersArr,setService }
})
